<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/resources/template/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.org/ui">


    <ui:define name="content">
        <h:panelGroup rendered="#{!webUserController.hasPrivilege('LabReportsLevel1')}" >
            You are NOT authorized
        </h:panelGroup>

        <h:panelGroup rendered="#{webUserController.hasPrivilege('LabReportsLevel1')}" >
            <h:form>
                <p:panel header="Investigation Month End Summary">
                    <f:facet name="header" >
                        <h:commandButton value="Refresh" />
                    </f:facet>
                    <p:panelGrid columns="4">
                        <h:outputLabel value="From Date"/>
                        <p:calendar id="frmDate" value="#{serviceMonthSummeryController.fromDate}"   pattern="dd MMMM yyyy HH:mm:ss" >
                        </p:calendar>

                        <h:outputLabel value="To Date"/>
                        <p:calendar id="toDate" value="#{serviceMonthSummeryController.toDate}"  pattern="dd MMMM yyyy HH:mm:ss" >
                        </p:calendar>
                    </p:panelGrid>

                    <p:dataTable value="#{serviceMonthSummeryController.items}" var="c" >
                        <p:column headerText="Test Name">
                            <h:outputLabel value="#{c.service.name}"/>
                        </p:column>
                        <p:column headerText="Count">
                            <h:outputLabel value="#{c.count}"/>
                        </p:column>
                        <p:column headerText="Total">
                            <h:outputLabel value="#{c.total}"/>
                        </p:column>

                    </p:dataTable>




                </p:panel>        
            </h:form>
        </h:panelGroup>
    </ui:define>

</ui:composition>
